
[#macro payproviderShowView]
<div  class="model-form">
    <el-page-header @back="goBack" content="详情">
    </el-page-header>

        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
            <el-menu-item index="1">
                支付服务商详情
            </el-menu-item>
        </el-menu>
        <div>
            <router-view></router-view>
        </div>

</div>
[/#macro]
[#macro payproviderShowConfig]
<script type="text/x-template" id="my-payprovider-show">
    [@payproviderShowView /]
</script>
	<script type="text/javascript">
		//显示组件开始
		var payproviderShowConfig = {};
		payproviderShowConfig.template = "#my-payprovider-show";
		payproviderShowConfig.methods =config.basicMethod();
		payproviderShowConfig.data = function () {
			return {
				viewModel: {
				},
				activeIndex: "1"
			}
		};

		payproviderShowConfig.methods.handleSelect = function (index) {
			console.log(index)
			var selectId = this.selectId;
			if (index == "1") {
				this.$router.replace({ path: '/view/index', query: { id: selectId, activeIndex: 1, time: Math.random() } })
			}
			else if (index == "2") {
				this.$router.replace({ path: '/view/members', query: { id: selectId, activeIndex: 2, time: Math.random() } })
			} else {

			}
		};

		payproviderShowConfig.mounted = function () {
		   	var id = this.$route.query.id;
			var activeIndex = this.$route.query.activeIndex;

			var self = this;
			var data = {};
			data.id = id;
			this.selectId = data.id;
			if (activeIndex) {
				this.activeIndex = activeIndex;
			}
		}
		var payproviderShowView = Vue.component('my-payprovider-view', payproviderShowConfig);
		//显示组件结束		
	</script>
[/#macro]



[#macro childPayproviderView]
    <div >
        <el-form class="viewForm" label-width="80px">
            <el-col :span="22">
                <el-form-item label="服务商名称">
                    <div v-html="viewModel.name">></div>
                </el-form-item>
            </el-col>
            <el-col :span="22">
                <el-form-item label="服务商Id">
                    <div v-html="viewModel.platformId">></div>
                </el-form-item>
            </el-col>
            <el-col :span="22">
                <el-form-item label="服务商户号">
                    <div v-html="viewModel.platformMch">></div>
                </el-form-item>
            </el-col>
            <el-col :span="22">
                <el-form-item label="服务商Key">
                    <div v-html="viewModel.key">></div>
                </el-form-item>
            </el-col>
            <el-col :span="22">
                <el-form-item label="备注">
                    <div v-html="viewModel.note">></div>
                </el-form-item>
            </el-col>
        </el-form>
    </div>
 [/#macro]

[#macro childPayproviderConfig]
    <script type="text/x-template" id="child-payprovider-show">
        [@childPayproviderView /]
    </script>
    <script type="text/javascript">

        var childPayproviderShowConfig = {};
        childPayproviderShowConfig.template = "#child-payprovider-show";
        childPayproviderShowConfig.methods = config.basicMethod();
        childPayproviderShowConfig.data = function () {
            return {
                viewModel: {
                }
            }
        };
        childPayproviderShowConfig.mounted = function () {
            var id = this.$route.query.id;
            var self = this;
            var data = {};
            data.id = id;
            this.postData("${siteurl}tenantRest/payprovider/view.htm", data, function (res) {
                if (res.code == 0) {
                    self.viewModel = res;

                }
            });
        }
        var childPayproviderShowView = Vue.component('child-payprovider-show', childPayproviderShowConfig);
    </script>
[/#macro]

